import Vue from "vue";
import Router from "vue-router";
import Home from "./views/Home.vue";

Vue.use(Router);

export default new Router({
  // mode: 'history',
  routes: [
    {
      path: "/home",
      name: "home",
      component: () => import("@/components/Layout"),
      children: [
        // {
        //   path: '',
        //   name: 'home',
        //   // component: () => import('@/views/Home')
        // },
        {
          path: "/about",
          name: "test",
          component: () => import("@/views/About")
        },
        {
          path: "/home",
          name: "home",
          component: () => import("@/views/About")
          // component: () => import('@/views/Home')
        },
        {
          path: "/term",
          name: "term",
          component: () => import("@/views/term")
        },
        {
          path: "/class",
          name: "class",
          component: () => import("@/views/class")
        },
        {
          path: "/classroom",
          name: "classroom",
          component: () => import("@/views/classroom")
        },
        {
          path: "/teacher",
          name: "teacher",
          component: () => import("@/views/teacher")
        },
        {
          path: "/student",
          name: "student",
          component: () => import("@/views/student")
        },
        {
          path: "/course",
          name: "course",
          component: () => import("@/views/course")
        },
        {
          path: "/grade",
          name: "grade",
          component: () => import("@/views/grade")
        },
        {
          path: "/module",
          name: "module",
          component: () => import("@/views/module")
        },
        {
          path: "/role",
          name: "role",
          component: () => import("@/views/role")
        },
        {
          path: "/report",
          name: "report"
          // component: () => import('@/views/report')
        }
      ]
    },
    {
      path: "/",
      name: "login",
      meta: {
        title: "登录"
      },
      component: () => import("@/views/Login")
    }
  ]
});
